import {Component, OnInit} from '@angular/core';

@Component({
  selector: 'app-waiter-count',
  templateUrl: './waiter-count.component.html',
  styleUrls: ['./waiter-count.component.css']
})
export class WaiterCountComponent implements OnInit {

  showDetails = true;
  uid = '';
  scrollTop:number;
  ngOnInit(){
  }

  // 点击列表切换显示状态
  viewState($event) {
    this.uid = $event;
    this.scrollTop = $(document).scrollTop();
    this.showDetails = false;
  }

  // 关闭详情页
  close($event) {
    if ($event) {
      this.showDetails = true;
      $("html,body").animate({scrollTop:this.scrollTop},0.5);
    }
  }

}
